<template>
    <div class="content">
        <div class="title">
            <van-icon @click="router.back()" class="icon" size="22px" color="#fff" name="arrow-left" />
        </div>
        <img class="titimg" src="@/assets/invitation/tit.png" alt="">
        <img class="userimg" src="@/assets/invitation/user.png" alt="">
        <div class="link">
            <div class="left">
                <span>{{ $t('邀請鏈接') }}</span>
                <div style="font-size: 13px;">https://bethedex.com?referral=0x3200d78b729d9eb5427b6d330C1089e0ddb668A5</div>
            </div>
            <van-icon @click="fuzhi" color="#fff" size="20px" name="link-o" />
        </div>
        <div class="yaoqing">
            <div style="font-size: 15px; color: #fff;">{{ $t('我的邀請') }}</div>
            <div class="btn">
                <div class="left">
                    <div>0</div>
                    <div style="font-size: 13px;">{{ $t('邀請人數') }}</div>
                </div>
                <div @click="goto('/rewards')" class="right">
                    <div>0</div>
                    <div style="font-size: 13px;">{{ $t('邀請記錄') }}<van-icon size="12px" name="arrow" /></div>
                </div>
            </div>
        </div>
    </div>
</template>

<script setup>
import { ref } from 'vue';
import { useRouter } from 'vue-router';
const router = useRouter()

function fuzhi() {

}

function goto(url) {
    router.push(url)
}

</script>

<style lang="scss" scoped>
.content {
    width: 100%;
    height: 100vh;
    background-color: #17171a;
    padding: 0 15px;
    box-sizing: border-box;

    .title {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        height: 54px;
        padding: 15px 0;
        box-sizing: border-box;

        .text {
            font-size: 15px;
            color: #fff;
        }
    }

    .titimg {
        width: 149px;
        height: 24px;
    }

    .userimg {
        padding: 0 20px;
        width: 320px;
        height: 214px;
    }

    .link {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        height: 103px;
        background-color: #2e323b;
        font-size: 15px;
        color: #fff;
        padding: 15px;
        box-sizing: border-box;
        border-radius: 10px;

        .left {
            width: 280px;
            height: 30px;
            //换行
            white-space: normal;
            overflow-wrap: break-word;
            margin-bottom: 50px;
        }
    }

    .yaoqing {

        width: 100%;
        background-color: #2e323b;
        height: 132px;
        margin-top: 14px;
        border-radius: 10px;
        box-sizing: border-box;
        padding: 15px;
        font-size: 17px;
        color: #fff;

        .btn {
            display: flex;
            justify-content: space-between;
            margin-top: 14px;
        }

    }
}
</style>